require "View/BaseCtrl"

local P = NewClass(BaseCtrl, ClassFromFile(...));
local inited = false

local animGroup = UIAnimGroup.New()
animGroup.duration = 0.2

local scaleAnim = UIAnimElem.New()
scaleAnim.type = WindowAnimType.Scale
scaleAnim.method = UITweener.Method.EaseOut
scaleAnim.from = 1.5
scaleAnim.to = 1
animGroup.anims:Add(scaleAnim)

local alphaAnim = UIAnimElem.New()
alphaAnim.type = WindowAnimType.Alpha
alphaAnim.method = UITweener.Method.EaseOut
alphaAnim.from = 0
alphaAnim.to = 1
animGroup.anims:Add(alphaAnim)


P.winAnim = animGroup

function P:Init(params)

	local i = math.random(os.time()) % #Config.minigame_pipe + 1

	RootWindowManager.instance:ShowWindow("PipeGameWindow"):Init(Config.minigame_pipe[i])
end
